Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --fail-level check CLI option #52

Merged
merged 1 commit into from
Jun 24, 2024
Merged

Conversation

kochalex
Copy link
Contributor

@kochalex kochalex commented May 30, 2024

Adds a --fail-level flag with 'check' as the only supported option to have a very basic implementation of what was discussed in #17.

Here's an example of it working:

$ erb-format --fail-level check test/fixtures/attributes.html.erb
<img
  src="image.jpg"
  alt="Responsive Image"
  srcset="image-480w.jpg 480w, image-800w.jpg 800w, image-1200w.jpg 1200w"
  sizes="(max-width: 600px) 480px, (max-width: 1000px) 800px, 1200px"
  data-autocomplete-min-length-value="2"
  data-short-url="//test.com/?q=v"
  data-long-url="https://google.ca/this-is-a-long-url-with-a-query-string?query=something"
  data-long-url-single='https://google.ca/this-is-a-long-url-with-a-query-string?query=something'
>
$ echo $?
1

Fixes #17

remove write flag from test, be consistent about quotes
@elia
Copy link
Member

elia commented Jun 24, 2024

Thanks, this is great!

@elia elia merged commit cbeab31 into nebulab:main Jun 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return exit code if file is not formatted
2 participants